const BaseController = require("../library/base-controller");
const ConfigMapper = require("../database/mapper/config");

class SystemController extends BaseController {
    init() {
        super.init();
        this.configMapper =  new ConfigMapper()
    }

    async configs(){
        let data = await this.configMapper.configs()

        return this.success(data)
    }
    async saveConfig(params){
        await this.configMapper.saveAll(params)
        return this.success("保存成功")
    }
}

module.exports = SystemController